package com.java.demoJSON;

import com.alibaba.fastjson.JSON;

public class Demo5 {
    public static void main(String[] args) {
        //1.  转换
        Book book = JSON.parseObject("{\"id\":\"1002\",\"info\":\"床前明月光，疑是地上霜\",\"name\":\"唐诗三百首\"}", Book.class);
        System.out.println(book.getName());
    }
}
